package sessionBeans;
import java.util.Set;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import entityBeans.Address;
import entityBeans.Contact;
import entityBeans.ContactGroup;
import entityBeans.PhoneNumber;

@Stateless(mappedName = "AddressBeanEntity")
public class GestionAddressBeanEntity implements GestionAddressRemote {

	@PersistenceContext
	EntityManager em;
	
	@Override
	public void addAddress(String street, String city, String zip, String country) {
		Address adresse=new Address();
		adresse.setStreet(street);
		adresse.setCity(city);
		adresse.setZip(zip);
		adresse.setCountry(country);	
		
		em.persist(adresse);
		
	}

	@Override
	public void removeAddress(long id) {
		//em.remove(find(Address.class,id));
		
	}

}
